package cn.yeziji.forum.entity;

import cn.org.atool.fluent.mybatis.annotation.FluentMybatis;
import cn.org.atool.fluent.mybatis.annotation.TableField;
import cn.org.atool.fluent.mybatis.annotation.TableId;
import cn.org.atool.fluent.mybatis.base.RichEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * ForumQuestionEntity: 数据映射实体定义
 *
 * @author Powered By Fluent Mybatis
 */
@SuppressWarnings({"rawtypes", "unchecked"})
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@FluentMybatis(table = "forum_question", schema = "yzj_forum")
public class ForumQuestionEntity extends RichEntity {
  private static final long serialVersionUID = 1L;

  /** */
  @TableId("id")
  private Integer id;

  /** 答案 ID */
  @TableField("answerId")
  private Integer answerId;

  /** 问题被收藏的数量 */
  @TableField("collectionNumber")
  private Integer collectionNumber;

  /** 提问的标题 */
  @TableField("title")
  String title;

  /** 提问的 MD 文本 */
  @TableField("content")
  private String content;

  /** 问题创建时间 */
  @TableField("createTime")
  private Date createTime;

  /** 逻辑删除 */
  @TableField("delete")
  private Boolean delete;

  /** 选中答案时间 */
  @TableField("updateTime")
  private Date updateTime;

  /** 观看人数 */
  @TableField("viewNumber")
  private Integer viewNumber;

  /** 用户 ID */
  @TableField("userId")
  private Integer userId;

  @Override
  public final Class entityClass() {
    return ForumQuestionEntity.class;
  }
}
